# -*- coding:utf-8 -*-
"""文档描述:
MTD-购物车服务
"""

from tornado.options import define, options
define("env", default='develop', help="", type=str)
# define("env", default='release', help="", type=str)
define("port", default=2018, help="run on the given port", type=int)

# 该代码务必放在导入其它from,import的代码前面,如从16行到21的import一定要放到该句的下面
options.parse_command_line()


from url import URLS
from settings import APPLICATION_SETTINGS as SETTINGS

from tornado import web
from tornado.ioloop import IOLoop

app = web.Application(URLS, **SETTINGS)

if __name__ == "__main__":
    app.listen(options.port, xheaders=True)
    IOLoop.current().start()
